# 安装gcc（用于编译nginx）
sudo yum install gcc
# 安装nginx依赖包
sudo yum install pcre pcre-devel zlib zlib-devel openssl openssl-devel
# 获取nginx包
sudo wget http://nginx.org/download/nginx-1.20.1.tar.gz
# 解压
sudo tar -zxvf ./nginx-1.20.1.tar.gz
# 进入解压后的文件夹
cd nginx-1.20.1
# 编译
sudo ./configure
# 安装
sudo make && make install
# 启动
# sudo ./usr/local/nginx/sbin/nginx
